package com.cupk.entity;

/**
 * 名称:Gender
 * 描述:
 *
 * @version 1.0
 * @author:zjf
 * @datatime:2023-06-24 22:41
 */
public enum Gender {
    MALE("男"),
    FEMALE("女");

    private final String value;

    Gender(String value) {
        this.value = value;
    }

    public String getValue() {
        return value;
    }

    // You may need to add a method to get the enum from a String value
    public static Gender fromValue(String value) {
        for (Gender gender : Gender.values()) {
            if (gender.getValue().equals(value)) {
                return gender;
            }
        }
        throw new IllegalArgumentException("Unexpected value: " + value);
    }
}
